H=5;//current+H
ws=3;
gm=.9;
ngen=10;
for k=0:ngen
    [fdg, err] = mopen("gen"+string(k)+".dat");
    [fdp, err] = mopen("path"+string(k)+".dat",'wt');
    gsize=strtod(mgetl(fdg,1));
    grid=mgetl(fdg);
    [s,plo]=atos2(genpls2([1000;1;1000],1));
    //pls=string(s);
    for i=1:size(s,1)
        mputl(string(s(i)),fdp);
    end
    file("close", fdg);
    file("close", fdp);
end
